package com.cz.register;

import java.util.Random;

public class test08 {
    public static void main(String[] args) {
        Random r = new Random();
        int a = r.nextInt(10);
        int b = r.nextInt(11);
        System.out.println(a);
        System.out.println(b);

        // 获取30到50，
        int c = r.nextInt(21)+30;
        System.out.println(c);

        // a到b
//        r.nextInt(b-a+1)+a;
    }
}
